package main

import (
	"file_watcher"
	"fmt"
	"sync"
)

func main()  {
	fswatcher,err := file_watcher.NewFileWatcher()
	if err != nil{
		fmt.Println(err)
	}
    var waitx sync.WaitGroup
	waitx.Add(1)

	go fswatcher.ReadEvents()
	go fswatcher.ListenEvent()
	go file_watcher.HttpServer(file_watcher.RegistFuncs(fswatcher))
	waitx.Wait()
}